<html>
<head>
</head>
<body>

<script>
	<!--
	function printContent(id){
	str=document.getElementById(id).innerHTML;
	newwin=window.open('','printwin','left=100,top=100,width=400,height=400');
	newwin.document.write('<HTML><HEAD>');
	newwin.document.write('<TITLE>Print Page</TITLE>');
	newwin.document.write('<script>');
	newwin.document.write('function chkstate(){');
	newwin.document.write('if(document.readyState==\"complete\"){');
	newwin.document.write('window.close()');
	newwin.document.write('}');
	newwin.document.write('else{');
	newwin.document.write('setTimeout(\"chkstate()\",2000)');
	newwin.document.write('}');
	newwin.document.write('}');
	newwin.document.write('function print_win(){');
	newwin.document.write('window.print();');
	newwin.document.write('chkstate();');
	newwin.document.write('}');
	newwin.document.write('<\/script>');
	newwin.document.write('</HEAD>')
	newwin.document.write('<BODY onload=\"print_win()\">');
	newwin.document.write(str);
	newwin.document.write('</BODY>');
	newwin.document.write('</HTML>');
	newwin.document.close();
	}
	//-->
</script>
<div id="contentToPrint">
<?php
  echo $_GET['texto']
?>
</div>
<br/><br/><br/>
<a href="#null" onclick="printContent('contentToPrint')">Presione para imprimir</a>
</body>
</html>